package com.fotile.weixin.event.thread;




import com.fotile.weixin.event.dto.InstructionObject;
import com.fotile.weixin.event.dto.Processor;

import java.util.concurrent.Callable;

public class ResponseCallable implements Callable<InstructionObject> {
	
	private InstructionObject io;
	private Processor<InstructionObject> process;
	private long startTimeStamp;

	public ResponseCallable(InstructionObject io,
			Processor<InstructionObject> process,
			long startTimeStamp) {
		super();
		this.io = io;
		this.process = process;
		this.startTimeStamp = startTimeStamp;
	}

	@Override
	public InstructionObject call() throws Exception {
		process.process(io, startTimeStamp);
		
		return io;
	}

}
